xend: fix automatic vcpu NUMA placement
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 22 May 2008 14:11:06 +0000 (15:11 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 22 May 2008 14:11:06 +0000 (15:11 +0100)
commit45ea54341290b85554730bdf71d96a27e02c1b26
treeacc8d7ad972f84bf81571938a8c526e1ec99b007
parenta93dfae74ead5ab130ac2e7d97e478978242cca2
xend: fix automatic vcpu NUMA placement

The automatic NUMA placement code (find_relaxed_node) in
XendDomainInfo.py contains several bugs:
1. The domain just created shall not be considered in the load
calculation.
2. Nodes with too less memory for the domain must be considered during
the load calculation phase and abandoned later, currently these nodes
win with a load of 0.
3. CPUs which are offline shall not be considered in load calculation.
4. (Integer-)Dividing the load value by the number of cores per node
may conceal subtle load differences resulting in a non-optimal node to
be chosen.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
tools/python/xen/xend/XendDomainInfo.py